<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeFile="ViewInstructorInfo.aspx.cs" Inherits="AdminPages_ViewInstructorInfo" %>

   <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">

        <asp:DataList ID="instructorList" 
            runat="server" 
            CellPadding="4" 
            ForeColor="#333333" 
            OnItemCommand="instructorList_ItemCommand">
            
            <ItemTemplate>
                
                Instructor:    <strong><%# Eval("FIRST") %> 
                                       <%# Eval("LAST") %></strong><br />                
                Address:       <strong><%# Eval("ADDRESS") %></strong><br />
                City:          <strong><%# Eval("CITY" ) %></strong><br />
                State:         <strong><%# Eval("STATE" ) %></strong><br />
                Zip Code:      <strong><%# Eval("ZIP" ) %></strong><br />
                Office Phone:  <strong><%# Eval("OFFICE" ) %></strong><br />
                Phone Number:  <strong><%# Eval("PHONE" ) %></strong>  <br />
                E-mail Address:<strong><%# Eval("EMAIL") %></strong><br />
                <asp:LinkButton ID="editButton" runat="server"
                Text='<%#"Edit " + Eval("FIRST") + " " + Eval("LAST")%>'
                CommandName="EditPlease"
                CommandArgument='<%# Eval("ID") %>' />
                
            </ItemTemplate>
            
            <SeparatorTemplate>
                <hr />
            </SeparatorTemplate>

            <FooterStyle BackColor="#1C5E55" 
                Font-Bold="True" 
                ForeColor="White" />
            
            <AlternatingItemStyle BackColor="White" />
            
            <ItemStyle BackColor="#E3EAEB" />
            
            <SelectedItemStyle BackColor="#C5BBAF" 
                Font-Bold="True" 
                ForeColor="#333333" />
            
            <HeaderStyle BackColor="#1C5E55" 
                Font-Bold="True" 
                ForeColor="White" />
        </asp:DataList>
        <asp:TextBox ID="txtStudentID" 
            runat="server" 
            Visible="False"/>
        <asp:TextBox ID="txtCourseID" 
            runat="server" 
            Visible="False"/>
        
   </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:DetailsView ID="instructorDetails" 
        runat="server" 
        AutoGenerateRows="False" 
        OnModeChanging="instructorDetails_ModeChanging" 
        OnItemUpdating="instructorDetails_ItemUpdating" >
    <Fields>
    <asp:TemplateField HeaderText="Instructor ID">
        <ItemTemplate>
            <asp:Label ID="firstLabel" 
                runat="server" 
                Text='<%#Bind("ID") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:Label ID="firstLabel" runat="server" Text='<%#Bind("ID") %>'></asp:Label>
        </EditItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="First Name">
        <ItemTemplate>
            <asp:Label ID="firstLabel" runat="server" Text='<%#Bind("FIRST") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editFirstName" runat="server" Text='<%#Bind("FIRST") %>' ></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertFirstName" runat="server" Text='<%#Bind("FIRST") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Last Name">
        <ItemTemplate>
            <asp:Label ID="lastLabel" runat="server" Text='<%#Bind("LAST") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editLastName" runat="server" Text='<%#Bind("LAST") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertLastName" runat="server" Text='<%#Bind("LAST") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Address">
        <ItemTemplate>
             <asp:Label ID="addressLabel" runat="server" Text='<%#Bind("ADDRESS") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editAddress" runat="server" Text='<%#Bind("ADDRESS") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertAddress" runat="server" Text='<%#Bind("ADDRESS") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="City">
        <ItemTemplate>
            <asp:Label ID="cityLabel" runat="server" Text='<%#Bind("CITY") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editCity" runat="server" Text='<%#Bind("CITY") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertCity" runat="server" Text='<%#Bind("CITY") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="State">
        <ItemTemplate>
            <asp:Label ID="stateLabel" runat="server" Text='<%#Bind("STATE") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editState" runat="server" Text='<%#Bind("STATE") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertState" runat="server" Text='<%#Bind("STATE") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Zip">
        <ItemTemplate>
            <asp:Label ID="zipLabel" runat="server" Text='<%#Bind("ZIP") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editZip" runat="server" Text='<%#Bind("ZIP") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertZip" runat="server" Text='<%#Bind("ZIP") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Office Number">
        <ItemTemplate>
            <asp:Label ID="officeLabel" runat="server" Text='<%#Bind("OFFICE") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editOffice" runat="server" Text='<%#Bind("OFFICE") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertOffice" runat="server" Text='<%#Bind("OFFICE") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Phone Number">
        <ItemTemplate>
            <asp:Label ID="phoneLabel" runat="server" Text='<%#Bind("PHONE") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editPhone" runat="server" Text='<%#Bind("PHONE") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertPhone" runat="server" Text='<%#Bind("PHONE") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Email Address">
        <ItemTemplate>
            <asp:Label ID="emailLabel" runat="server" Text='<%#Bind("EMAIL") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="editEmail" runat="server" Text='<%#Bind("EMAIL") %>'></asp:TextBox>
        </EditItemTemplate>
        <InsertItemTemplate>
            <asp:TextBox ID="insertEmail" runat="server" Text='<%#Bind("EMAIL") %>'></asp:TextBox>
        </InsertItemTemplate>
    </asp:TemplateField>
    <asp:CommandField ShowEditButton="true" />
</Fields>
<HeaderTemplate>
<strong><%#Eval("FIRST") %> <%#Eval("LAST") %></strong>
</HeaderTemplate>
</asp:DetailsView>
    </asp:Content>
